<?php
/**
 * sfForumMessage form.
 *
 * @package    Nika
 * @subpackage form
 * @author     Alexey Shapran (alexey.shapran@gmail.com)
 * @version    SVN: $Id: sfDoctrinePluginFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class sfForumMessageForm extends PluginsfForumMessageForm
{
	public function configure()
	{
		$this->setWidgets(array(
      'id'         => new sfWidgetFormInputHidden(),
      'topic_id'   => new sfWidgetFormInputHidden(),
      'content'    => new sfWidgetFormTextareaFCK(array('toolbar'=>'Basic','height'=>'150', 'skin' => 'office2003')),
      'author'     => new sfWidgetFormInputHidden(),
      'hide'       => new sfWidgetFormInputCheckbox(),
      'created_at' => new sfWidgetFormDateTime(),
      'updated_at' => new sfWidgetFormDateTime(),
    ));

/*    $this->setValidators(array(
      'id'         => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)),
      'topic_id'   => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('sfForumTopic'), 'required' => true)),
      'content'    => new sfValidatorString(array('required' => true, 'required'=>'content')),
      'author'     => new sfValidatorInteger(array('required'=>true, 'required'=>'author')),
      'hide'       => new sfValidatorBoolean(array('required' => false)),
      'created_at' => new sfValidatorDateTime(),
      'updated_at' => new sfValidatorDateTime(),
    ));*/

    $this->widgetSchema->setNameFormat('sf_forum_message[%s]');
	$this->widgetSchema->setLabel('content',' ');
    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
	}
}
